﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SW_SoftBully.Models.ModuloAdministracion.Convocatoria;
using SW_SoftBully.Models.ModuloAdministracion.Reunion;
namespace SW_SoftBully.Controllers.ModuloAdministracion
{
    public class ReunionController : Controller
    {
        //
        // GET: /Reunion/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Reunion()
        {
            return View();
        }


        public ActionResult BuscarReunion()
        {
            return View();
        }


        public ActionResult RegistrarReunion()
        {
            return View();
        }


        [HttpPost]
        public JsonResult buscarConvocatoria(Filtro filtro)
        {
            ConvocatoriaDAO dao = new ConvocatoriaDAO();
            List<ConvocatoriaBean> listaConvocatoria = new List<ConvocatoriaBean>();
            listaConvocatoria = dao.buscarConvocatoria(filtro);

            return Json(new { listaConvocatoria });
        }

        [HttpPost]
        public JsonResult buscarTema(ConvocatoriaBean convocatoriaBean)
        {
            ConvocatoriaDAO dao = new ConvocatoriaDAO();

            List<String> listaTema = dao.buscarTema(convocatoriaBean.id_convocatoria);



            return Json(new { listaTema });
        }

        [HttpPost]
        public JsonResult insertarReunion(ReunionBean reu)
        {
            ReunionDAO dao = new ReunionDAO();
            string mensaje = dao.insertarReunion(reu);
            

            return Json(new { mensaje });
        }


    }
}
